home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / prog_bas / ivbsrc.zip / ACCESS.FRM (.txt) next >
Visual Basic Form  |  1994-07-03  |  6KB  |  165 lines

  1. Form1
  2. Form1
  3. Form1%
  4. Command0
  5. Create a test file on disk C:
  6. Command6
  7. Command5
  8. Clear array
  9. Command4
  10. Clear list box
  11. Command3
  12. Rewrite array
  13. Command2
  14. Load list box
  15. Command1
  16. Create array
  17. List1
  18. hread
  19. hFile
  20. memAddrI
  21. dwBytes
  22. hwrite
  23. lclose
  24. llseek:
  25. lOffset
  26. iOrigin
  27. OpenFile
  28. lpFileName
  29. lpReOpenBuff
  30. OFSTRUCT
  31. wStyle
  32. OF_READ
  33. OF_WRITEo
  34.     OF_CREATEA
  35. GlobalAlloc
  36. wFlags
  37. GlobalFree}
  38. hMemW
  39. GlobalLock
  40. GlobalUnlock
  41. MemoryReada
  42. dwOffset
  43. lpvBuf
  44. dwcb$
  45. MemoryWrite
  46. Form_Clickp
  47. g_FMmain
  48. g_frecs
  49. f_mHndl
  50. CreateHuge;
  51. size1
  52. lpAddrM
  53. inBytes:
  54. lpAddr1(
  55. FillAvListBox
  56. SendMessage$
  57. ControlhWnd
  58. ListAvFonts
  59. LB_RESETCONTENTB
  60. mnuType
  61. mSel\
  62. GlobalHandleToSel
  63. rBytes
  64. TrueType
  65. Delete
  66. fntNm
  67. fullnameV
  68. LB_ADDSTRING
  69. LB_SETITEMDATAQ
  70. g_FType
  71. List1
  72. Command4_Click
  73. Command1_Click
  74. Command2_Click
  75. Command3_Click
  76. x127O
  77. LenRec
  78. frecs
  79. Command6_Click
  80. Command5_Click
  81. Command7_Click
  82. Command0_Click
  83. LOCATEZ
  84. f_Ofl
  85. f_FMmainz
  86. f_FRecs
  87. f_fType
  88. f_RecMmain
  89.     f_Recrecs
  90. f_Rec
  91.     f_RecType
  92. f_File
  93.     f_NbrRecs
  94. FillListBox
  95. RecLen
  96. f_mSel
  97. f_LenRec
  98. f_RecLen
  99. wParam
  100. lParam
  101. GetFocus
  102. WM_USER
  103. GMEM_MOVEABLE
  104. GMEM_ZEROINIT
  105.     Form_Load
  106. Form2
  107. _hread
  108. kernel
  109. _lclose
  110. Kernel
  111. _llseek
  112. Kernel
  113. Kernel
  114.   OpenFile() Flags
  115. Kernel)
  116. KernelA
  117. KernelA
  118. KernelA
  119. Toolhelp.dll:
  120. Toolhelp.dll}
  121. Toolhelp.dll}
  122. Open file structure record
  123. Name of file containing sample records
  124. Number of records in sample file
  125. Memory handle to global memory
  126. Sample record 
  127. Memory selectorc
  128. Length of sample recordg
  129. Command0_Click
  130. Write a series of records to a disk file. We'll read this file
  131. into memory later.
  132. Sample.dat
  133. Command1_Click
  134. Command2_Click
  135. Command3_Click
  136. Write records to memory in reverse order
  137. Command4_Click
  138. Command5_Click
  139. Command6_Click
  140. CreateHuge
  141. --- creates huge array of records from sample file. The records are in a 
  142.  type structure defined as "f_RecType". 
  143. Sample.dat
  144. --- open the data file for reading
  145. --- get the size of the file
  146. --- determine how many records are in the file
  147. --- reset the file pointer to the start of the file 
  148. --- create the global memory objecte
  149. --- make sure enough memory is available
  150. Insufficient memory to allocate array"
  151. --- get the address of the memory object
  152. --- read the data file into the memory objecte
  153. --- close the file
  154. --- unlock the memory object
  155. FillListBox
  156. --- get the array memory object selector
  157.  this only needs to be done once in any form or routine.
  158.  Note that memory is NOT locked. It doesn't need to be in
  159.  in protected mode so the selector is valid even if the memory
  160.  object gets moved.  As this routine requires the Win 3.1 API
  161.  calls, the app will always be running in protected mode. 
  162. --- read records from array (f_NbrRecs is total # of records)=
  163. --- read a record from array into f_Rec record structure
  164. --- add record to listbox
  165.